﻿namespace UtilZ.Dotnet.Ex.Communication.Net.Web
{
    /// <summary>
    /// web站点资源提供器接口
    /// </summary>
    public interface IWebSiteResourceProvider
    {
        /// <summary>
        /// 尝试获取站点资源，获取成功返回true[此时输出的资源文件路径和响应二选一，且响应优先级更高],获取失败返回false
        /// </summary>
        /// <param name="webSiteConfig">web站点配置</param>
        /// <param name="request">http请求</param>
        /// <param name="resourceFilePath">获取成功时的资源文件路径</param>
        /// <param name="response">获取成功时的响应,当响应不为null时直接使用此值响应输出</param>
        /// <returns>获取成功返回true,获取失败返回false</returns>
        bool TryGetResource(WebSiteConfig webSiteConfig, HttpRequest request, out string resourceFilePath, out IHttpResponse response);
    }

}
